package com.example.administrator.himalaya.testPackage;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.administrator.himalaya.R;
import com.example.administrator.himalaya.entity.recommendentity.RecommendEntityInterFace02;

import java.util.List;

/**
 * Created by liuchao on 2016/12/5.
 */

public class EditorsRecommendAdapter extends RecyclerView.Adapter<EditorsRecommendAdapter.ViewHolder> {
    private List<RecommendEntityInterFace02> list;
    private Context context;

    public EditorsRecommendAdapter(List<RecommendEntityInterFace02> list, Context context) {
        this.list = list;
        this.context = context;
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.recommend_item_guess, parent, false);
        ViewHolder holder = new ViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return list.size();
    }

    public static class ViewHolder extends RecyclerView.ViewHolder {
        private TextView textViewTitle, textView01, textView02, textView03;
        private TextView textView04, textView05, textView06;
        private ImageView imageView01, imageView02, imageView03;
        private ImageView imageView04, imageView05, imageView06;

        public ViewHolder(View itemView) {
            super(itemView);
            textViewTitle = (TextView) itemView.findViewById(R.id.layout00).findViewById(R.id.find_title);
            textView01 = (TextView) itemView.findViewById(R.id.layout01).findViewById(R.id.theme_title);
            imageView01 = (ImageView) itemView.findViewById(R.id.layout01).findViewById(R.id.theme_pic);
            textView02 = (TextView) itemView.findViewById(R.id.layout02).findViewById(R.id.theme_title);
            imageView02 = (ImageView) itemView.findViewById(R.id.layout02).findViewById(R.id.theme_pic);
            textView03 = (TextView) itemView.findViewById(R.id.layout03).findViewById(R.id.theme_title);
            imageView03 = (ImageView) itemView.findViewById(R.id.layout03).findViewById(R.id.theme_pic);


            textView04 = (TextView) itemView.findViewById(R.id.layout04).findViewById(R.id.theme_title);
            imageView04 = (ImageView) itemView.findViewById(R.id.layout04).findViewById(R.id.theme_pic);
            textView05 = (TextView) itemView.findViewById(R.id.layout05).findViewById(R.id.theme_title);
            imageView05 = (ImageView) itemView.findViewById(R.id.layout05).findViewById(R.id.theme_pic);
            textView06 = (TextView) itemView.findViewById(R.id.layout06).findViewById(R.id.theme_title);
            imageView06 = (ImageView) itemView.findViewById(R.id.layout06).findViewById(R.id.theme_pic);

        }
    }
}
